//=============================导航栏置顶
var nav = document.querySelector(".page-nav")
var navHeight = nav.scrollHeight
var headerHeight = document.querySelector(".header").scrollHeight
function fixedNav(){
    //获取页面被卷起的高度即滚动条隐藏的高度
    var top_distance = document.documentElement.scrollTop
    if(top_distance>(headerHeight-navHeight)){
        nav.style.position = "fixed";
        nav.style.top = 0;
        nav.style.backgroundColor = "white";
    }else{
        nav.style.position = "static";
    }
}
//当滑动条滑动时调用该方法
$(document).scroll(function(){
    fixedNav()
})
//多条件筛选（品牌、尺寸、价格、颜色）
// function changeFactor(){
//     var roughArr = document.querySelectorAll(".rough-filter");
//     //console.log(roughArr[0].className)
//     roughArr[0].innerText = "品牌："
//     roughArr[1].innerText = "尺寸："
//     roughArr[2].innerText = "价格："
//     roughArr[3].innerText = "颜色："
// }
// document.querySelector(".filter").onclick=function (){
//     changeFactor()
// }